3.193 \(\int \frac {(b \cos (c+d x))^n (A+C \cos ^2(c+d x))}{\sqrt {\cos (c+d x)}} \, dx\)

Optimal. Leaf size=140 \[ \frac {2 C \sin (c+d x) \sqrt {\cos (c+d x)} (b \cos (c+d x))^n}{d (2 n+3)}-\frac {2 (A (2 n+3)+2 C n+C) \sin (c+d x) \sqrt {\cos (c+d x)} (b \cos (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1}{4} (2 n+1);\frac {1}{4} (2 n+5);\cos ^2(c+d x)\right )}{d (2 n+1) (2 n+3) \sqrt {\sin ^2(c+d x)}} \]

[Out]

2*C*(b*cos(d*x+c))^n*sin(d*x+c)*cos(d*x+c)^(1/2)/d/(3+2*n)-2*(C+2*C*n+A*(3+2*n))*(b*cos(d*x+c))^n*hypergeom([1
/2, 1/4+1/2*n],[5/4+1/2*n],cos(d*x+c)^2)*sin(d*x+c)*cos(d*x+c)^(1/2)/d/(4*n^2+8*n+3)/(sin(d*x+c)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {20, 3014, 2643} \[ \frac {2 C \sin (c+d x) \sqrt {\cos (c+d x)} (b \cos (c+d x))^n}{d (2 n+3)}-\frac {2 (A (2 n+3)+2 C n+C) \sin (c+d x) \sqrt {\cos (c+d x)} (b \cos (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1}{4} (2 n+1);\frac {1}{4} (2 n+5);\cos ^2(c+d x)\right )}{d (2 n+1) (2 n+3) \sqrt {\sin ^2(c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[((b*Cos[c + d*x])^n*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]],x]

[Out]

(2*C*Sqrt[Cos[c + d*x]]*(b*Cos[c + d*x])^n*Sin[c + d*x])/(d*(3 + 2*n)) - (2*(C + 2*C*n + A*(3 + 2*n))*Sqrt[Cos
[c + d*x]]*(b*Cos[c + d*x])^n*Hypergeometric2F1[1/2, (1 + 2*n)/4, (5 + 2*n)/4, Cos[c + d*x]^2]*Sin[c + d*x])/(
d*(1 + 2*n)*(3 + 2*n)*Sqrt[Sin[c + d*x]^2])

Rule 20

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(b^IntPart[n]*(b*v)^FracPart[n])/(a^IntPart[n
]*(a*v)^FracPart[n]), Int[u*(a*v)^(m + n), x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
&&  !IntegerQ[m + n]

Rule 2643

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(Cos[c + d*x]*(b*Sin[c + d*x])^(n + 1)*Hypergeomet
ric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2])/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]), x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3014

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[
e + f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[(A*(m + 2) + C*(m + 1))/(m + 2), Int[(b*Sin[e + f*
x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int \frac {(b \cos (c+d x))^n \left (A+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx &=\left (\cos ^{-n}(c+d x) (b \cos (c+d x))^n\right ) \int \cos ^{-\frac {1}{2}+n}(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx\\ &=\frac {2 C \sqrt {\cos (c+d x)} (b \cos (c+d x))^n \sin (c+d x)}{d (3+2 n)}+\frac {\left (\left (C \left (\frac {1}{2}+n\right )+A \left (\frac {3}{2}+n\right )\right ) \cos ^{-n}(c+d x) (b \cos (c+d x))^n\right ) \int \cos ^{-\frac {1}{2}+n}(c+d x) \, dx}{\frac {3}{2}+n}\\ &=\frac {2 C \sqrt {\cos (c+d x)} (b \cos (c+d x))^n \sin (c+d x)}{d (3+2 n)}-\frac {2 (C+2 C n+A (3+2 n)) \sqrt {\cos (c+d x)} (b \cos (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1}{4} (1+2 n);\frac {1}{4} (5+2 n);\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+2 n) (3+2 n) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 140, normalized size = 1.00 \[ -\frac {2 \sqrt {\sin ^2(c+d x)} \sqrt {\cos (c+d x)} \csc (c+d x) (b \cos (c+d x))^n \left (A (2 n+5) \, _2F_1\left (\frac {1}{2},\frac {1}{4} (2 n+1);\frac {1}{4} (2 n+5);\cos ^2(c+d x)\right )+C (2 n+1) \cos ^2(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1}{4} (2 n+5);\frac {1}{4} (2 n+9);\cos ^2(c+d x)\right )\right )}{d (2 n+1) (2 n+5)} \]

Antiderivative was successfully verified.

[In]

Integrate[((b*Cos[c + d*x])^n*(A + C*Cos[c + d*x]^2))/Sqrt[Cos[c + d*x]],x]

[Out]

(-2*Sqrt[Cos[c + d*x]]*(b*Cos[c + d*x])^n*Csc[c + d*x]*(A*(5 + 2*n)*Hypergeometric2F1[1/2, (1 + 2*n)/4, (5 + 2
*n)/4, Cos[c + d*x]^2] + C*(1 + 2*n)*Cos[c + d*x]^2*Hypergeometric2F1[1/2, (5 + 2*n)/4, (9 + 2*n)/4, Cos[c + d
*x]^2])*Sqrt[Sin[c + d*x]^2])/(d*(1 + 2*n)*(5 + 2*n))

________________________________________________________________________________________

fricas [F]  time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \left (b \cos \left (d x + c\right )\right )^{n}}{\sqrt {\cos \left (d x + c\right )}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)/cos(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

integral((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n/sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \left (b \cos \left (d x + c\right )\right )^{n}}{\sqrt {\cos \left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)/cos(d*x+c)^(1/2),x, algorithm="giac")

[Out]

integrate((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n/sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

maple [F]  time = 0.47, size = 0, normalized size = 0.00 \[ \int \frac {\left (b \cos \left (d x +c \right )\right )^{n} \left (A +C \left (\cos ^{2}\left (d x +c \right )\right )\right )}{\sqrt {\cos \left (d x +c \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)/cos(d*x+c)^(1/2),x)

[Out]

int((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)/cos(d*x+c)^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \left (b \cos \left (d x + c\right )\right )^{n}}{\sqrt {\cos \left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)/cos(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

integrate((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n/sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )\,{\left (b\,\cos \left (c+d\,x\right )\right )}^n}{\sqrt {\cos \left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + C*cos(c + d*x)^2)*(b*cos(c + d*x))^n)/cos(c + d*x)^(1/2),x)

[Out]

int(((A + C*cos(c + d*x)^2)*(b*cos(c + d*x))^n)/cos(c + d*x)^(1/2), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))**n*(A+C*cos(d*x+c)**2)/cos(d*x+c)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________